<%--
    Document   : left
    Created on : Dec 1, 2011, 10:59:10 AM
    Author     : BlueZky
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<script>
    $(document).ready(function(){
        $('#search').keyup(function(event){
            if(event.keyCode == 13){
                $('#search-form').submit();
            }
        });
        $('.side-title').click(function(){
            $(this).parent(".side-group").children("ul").css("display","inherit");
            $(this).parent(".side-group").children("ul").children("li").toggle();
        });
    });
</script>
<div class="leftSid">
    <!-- Search box-->
    <div class="sidebar-box">
        <div class="sidebar-top">TÌM KIẾM</div>
        <div class="sidebar-mid">
            <form id="search-form" method="get" action="timkiem.htm">
                <div class="search" style="text-align: right; font-size: 11px;">
                    <div id="contact"><img src="images/contact.png"/></div>
                    <span class="l"></span>
                    <span class="c">
                        <input type="hidden" name="a" value="s"/>
                        <input type="text" name="search" id="search" class="search-box"/></span>
                    <span class="r"></span>
                    <div class="cleared"></div>
                    <a href="timkiem.htm"> Tìm nâng cao</a>
                </div>
            </form>
            
        </div>
    </div>
    <!-- End Search box-->

    <c:if test="${dsdanhmuc!=null}">
        <c:set var="dsDanhmucApplication" value="${dsdanhmuc}" scope="application" />
    </c:if>

    <!--Product-->
    <div class="sidebar-box">
        <div class="sidebar-top">SẢN PHẨM</div>
        <div class="sidebar-mid">
            <c:forEach var="item" items="${dsDanhmucApplication}">
                <div class="side-group">
                    <div class="side-title">${item.ten}</div>
                    <ul style="display: none;">
                        <c:forEach var="loai" items="${item.loaisps}">
                            <c:if test="${loai.spchinh!=1}">
                                <li style="display: none;"><a href="dm.htm?cid=${loai.ma}">${loai.ten}</a></li>
                            </c:if>
                        </c:forEach>
                    </ul>
                </div>
            </c:forEach>
        </div>
        <div class="sidebar-bottom"></div>
    </div>
    <!-- End Product-->
</div>